#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @author: zzll0909
# @file: test.py
# @time: 2021/6/25
# @software: PyCharm
import pymongo

# 全局设置，如访问的数据库
DB = "employee_info_db"
coll = "employee_info_coll"
# coll = "admins_coll"

if __name__ == "__main__":
    mongo_client = pymongo.MongoClient("mongodb://localhost:27017/")
    database = mongo_client.get_database(name=DB)
    collection = database.get_collection(name=coll)
    # employee_filter = {
    #     "name": "z",
    # }
    account_data = {
        "name": "uu",
    }
    result = collection.delete_one(account_data).deleted_count

    print(result)
    pass
